package com.smooth.site.sx.mag.basedata.college;

import java.util.List;

import com.smooth.common.site.common.utils.SpringContextHolder;
import com.smooth.common.site.modules.sys.utils.UserUtils;
import com.smooth.dao.gen.BaseCollegeMapper;
import com.smooth.dao.gen.bean.BaseCollege;
import com.smooth.dao.gen.bean.BaseCollegeExample;

public class CollegeUtils {
	private static BaseCollegeMapper baseCollegeMapper = SpringContextHolder.getBean(BaseCollegeMapper.class);
	
	public static List<BaseCollege> getCollegeList(){
		BaseCollegeExample baseCollegeExample = new BaseCollegeExample();
		
		if(UserUtils.isSchMag() ) {
			baseCollegeExample.createCriteria().andIdEqualTo(UserUtils.getUser().getSchId());
		}
		return baseCollegeMapper.selectByExample(baseCollegeExample);
	}
}
